package br.edu.ufcg.dsc.adsd.lotv.core;

import java.util.HashMap;
import java.util.Map;

import eduni.simjava.Sim_event;

public class LANPackage {
	
	private String src;
	public String getSrc() {
		return src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	public String getDst() {
		return dst;
	}

	public void setDst(String dst) {
		this.dst = dst;
	}

	private String dst;
	private Map<String, Object> records;
	
	public LANPackage(String src, String dst) {
		this(src, dst, new HashMap<String, Object>());
	}
	
	public LANPackage(String src, String dst, Map<String, Object> records) {
		this.src = src;
		this.dst = dst;
		this.records = records;
	}
	
	public Object valueOf(String key) {
		return this.records.get(key);
	}
	
	public void valueOf(String key, Object value) {
		this.records.put(key, value);
	}
	
	public static LANPackage extract(Sim_event info) {
		return (LANPackage)info.get_data();
	}
	
}
